<!DOCTYPE html>
<html>
    <head>
        <title>AGM历史销售</title>
        <link rel="stylesheet" href="/static/weui.min.css">
        <script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
        <link rel="shortcut icon" href="{{ url_for('static', filename='favicon.ico') }}">
        <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <style>
            .page, body{background-color: #fbf9fe}
            .page_title{color:#225fba}
            .hd{text-align:center}
            .weui_label{width:4em;}
            .bd{padding-bottom:30px;}
            .floatright{ float: right }
        </style> 
    </head>
    <body>        
        <div class="hd">
            <h1 class="page_title">AGM历史销售</h1> 
        </div>
        <div class="bd">
            <div class="weui_cells_title">销售相应数量</div>
            <div class="weui_cells">
                <div class="weui_cell">
                    <div class="weui_cell_bd weui_cell_primary">
                        <p>今日总销售：{{sellcount.get('today') or 0}}</p>
                    </div>
                    <div class="weui_cell_ft">今日排行：{{ getrank('today') }}</div>
                </div>
                <div class="weui_cell">
                    <div class="weui_cell_bd weui_cell_primary">
                        <p>昨日总销售：{{sellcount.get('yesterday') or 0}}</p>
                    </div>
                    <div class="weui_cell_ft">昨日排行：{{ getrank('yesterday') }}</div>
                </div>
                <div class="weui_cell">
                    <div class="weui_cell_bd weui_cell_primary">
                        <p>本周总销售：{{sellcount.get('week') or 0}}</p>
                    </div>
                    <div class="weui_cell_ft">本周排行：{{ getrank('week') }}</div>
                </div>
                <div class="weui_cell">
                    <div class="weui_cell_bd weui_cell_primary">
                        <p>上周总销售：{{sellcount.get('lastweek') or 0}}</p>
                    </div>
                    <div class="weui_cell_ft">上周排行：{{ getrank('lastweek') }}</div>
                </div>
                <div class="weui_cell">
                    <div class="weui_cell_bd weui_cell_primary">
                        <p>本月总销售：{{sellcount.get('month') or 0}}</p>
                    </div>
                    <div class="weui_cell_ft">本月排行：{{ getrank('month') }}</div>
                </div>
                <div class="weui_cell">
                    <div class="weui_cell_bd weui_cell_primary">
                        <p>上月总销售：{{sellcount.get('lastmonth'or 0)}}</p>
                    </div>
                    <div class="weui_cell_ft">上月排行：{{ getrank('lastmonth') }}</div>
                </div> 
                <div class="weui_cell">
                    <div class="weui_cell_bd weui_cell_primary">
                        <p>总销售数量：{{sellcount.get('total' or 0)}}</p>
                    </div>
                    <div class="weui_cell_ft">总排行：{{ getrank('total') }}</div>
                </div>                
            </div> 
            <div class="weui_cells_title floatright">更新时间：{{ time.strftime('%Y-%m-%d %H:%M') }}</div>
        </div>       
    </body>    
<html>